With the rapid development of information technology, the use of terminal devices, such as mobile phone and tablet device, become more and more popular, and the requirements for the terminal devices' performances become more and more critical. As a standard feature of the terminal device, the feature of using a fingerprint to unlock has been favored by major terminal device manufacturers. During using the fingerprint to unlock, a fingerprint image may be acquired firstly, and the fingerprint image may be compared with fingerprint templates. If the fingerprint image matches a fingerprint template, an unlocking operation may be performed; and if the fingerprint image does not match any fingerprint template, the user is prompted to press the fingerprint reader again. There generally should not be only one fingerprint template, but a plurality of fingerprint templates. In such case, there is generally one sequence in which any one of the plurality of fingerprint templates are selected from the plurality of fingerprint templates for comparison during the matching. The sequence is generally designed so that a fingerprint template recorded earlier should be selected earlier for comparison. Such sequence is extremely inflexible, reducing the efficiency of using the fingerprint to unlock.